/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BD;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Andre
 */
public class CriaConexao {
    public static Connection getConexao() throws SQLException{
         String url ="jdbc:postgresql://localhost:5432/sysloc";
        try {
            Class.forName("org.postgresql.Driver");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(CriaConexao.class.getName()).log(Level.SEVERE, null, ex);
        }

         return (Connection) DriverManager.getConnection(url,"postgres","123");
     
 }
}
